package oving8;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.image.BufferedImage;

public class ShapeObject {
	Shape shape;
	Color fillColor;
	Color outlineColor;
	BufferedImage bimg;
	int bimgH;
	int bimgV;
	public ShapeObject(Shape shape){
		this.shape=shape;
		fillColor=Color.BLUE;
		outlineColor= Color.RED;
		
		
	}
	public ShapeObject(BufferedImage bimg){
		this.bimg=bimg;
		bimgH=bimg.getHeight();
		bimgV=bimg.getWidth();
	}
	public String toString(){
		return "KOKO";
	}
	public Shape getShape() {
		return shape;
	}
	public void setShape(Shape shape) {
		this.shape = shape;
	}
	public Color getFillColor() {
		return fillColor;
	}
	public void setFillColor(Color fillColor) {
		this.fillColor = fillColor;
	}
	public Color getOutlineColor() {
		return outlineColor;
	}
	public void setOutlineColor(Color outlineColor) {
		this.outlineColor = outlineColor;
	}
	public void setImage(BufferedImage bimg) {
		this.bimg = bimg;
	}
	public void paint(Graphics2D g){
		if(shape!=null){
			if(outlineColor!=null){
				g.setColor(outlineColor);
				g.draw(shape);
			}
			if(fillColor!=null){
				g.setColor(fillColor);
				g.fill(shape);
			}
		}
		if(bimg!=null){
			
		}
	}
	public boolean contains(int x,int y){
		return shape.contains(x, y);
	}
	
	
}
